﻿from django import forms
from userprofile.models import UserProfile
from communication.models import PrivateMessage

class PrivateMessageForm(forms.ModelForm):
    
    
    sender = forms.ModelChoiceField(queryset=UserProfile.objects.all(), widget=forms.HiddenInput())
    receiver = forms.ModelChoiceField(queryset=UserProfile.objects.all(), widget=forms.HiddenInput())

    class Meta:
        model = PrivateMessage
        fields = ('subject', 'text', 'sender', 'receiver')